package Heap;

import java.util.PriorityQueue;

public class Test {

    public static void main(String[] args) {
        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();
        priorityQueue.offer(10);
        priorityQueue.offer(1);
        priorityQueue.offer(18);
        priorityQueue.offer(6);
        priorityQueue.offer(76);
        priorityQueue.offer(99);

        System.out.println(priorityQueue.poll());
        System.out.println(priorityQueue.poll());
    }
}
